package com.vil.mapper;

import com.vil.entity.Admin;
import com.vil.entity.Authority;
import com.vil.entity.Function;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface FunctionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Function record);

    int insertSelective(Function record);

    Function selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Function record);

    int updateByPrimaryKey(Function record);

    //根据角色和父id 获得1级菜单
    public List<Function> getMainFunctionList(Authority auth);

    //获得2级菜单
    public List<Function> getSubFunctionList(Function fun);

    List<Function> getListByManyConditions(Function recode);
    //批量删除
    int deleteMany(Long[] array);
}